package com.miplus.ccrm.core.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName credit_account_billhist
 */
@TableName(value ="credit_account_billhist")
@Data
public class CreditAccountBillhist implements Serializable {
    /**
     * 自增序列
     */
    @TableId(type = IdType.AUTO)
    private Integer billId;

    /**
     * 账号
     */
    private String acct;

    /**
     * 账单日
     */
    private Date billDate;

    /**
     * 还款日
     */
    private Date repayDate;

    /**
     * 还款金额
     */
    private BigDecimal settledBillAmt;

    /**
     * 最低还款金额
     */
    private BigDecimal lowestRepayBal;

    /**
     * 实际还款金额
     */
    private BigDecimal repayment;

    /**
     * 更新时间
     */
    private Date updt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CreditAccountBillhist other = (CreditAccountBillhist) that;
        return (this.getBillId() == null ? other.getBillId() == null : this.getBillId().equals(other.getBillId()))
            && (this.getAcct() == null ? other.getAcct() == null : this.getAcct().equals(other.getAcct()))
            && (this.getBillDate() == null ? other.getBillDate() == null : this.getBillDate().equals(other.getBillDate()))
            && (this.getRepayDate() == null ? other.getRepayDate() == null : this.getRepayDate().equals(other.getRepayDate()))
            && (this.getSettledBillAmt() == null ? other.getSettledBillAmt() == null : this.getSettledBillAmt().equals(other.getSettledBillAmt()))
            && (this.getLowestRepayBal() == null ? other.getLowestRepayBal() == null : this.getLowestRepayBal().equals(other.getLowestRepayBal()))
            && (this.getRepayment() == null ? other.getRepayment() == null : this.getRepayment().equals(other.getRepayment()))
            && (this.getUpdt() == null ? other.getUpdt() == null : this.getUpdt().equals(other.getUpdt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getBillId() == null) ? 0 : getBillId().hashCode());
        result = prime * result + ((getAcct() == null) ? 0 : getAcct().hashCode());
        result = prime * result + ((getBillDate() == null) ? 0 : getBillDate().hashCode());
        result = prime * result + ((getRepayDate() == null) ? 0 : getRepayDate().hashCode());
        result = prime * result + ((getSettledBillAmt() == null) ? 0 : getSettledBillAmt().hashCode());
        result = prime * result + ((getLowestRepayBal() == null) ? 0 : getLowestRepayBal().hashCode());
        result = prime * result + ((getRepayment() == null) ? 0 : getRepayment().hashCode());
        result = prime * result + ((getUpdt() == null) ? 0 : getUpdt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", billId=").append(billId);
        sb.append(", acct=").append(acct);
        sb.append(", billDate=").append(billDate);
        sb.append(", repayDate=").append(repayDate);
        sb.append(", settledBillAmt=").append(settledBillAmt);
        sb.append(", lowestRepayBal=").append(lowestRepayBal);
        sb.append(", repayment=").append(repayment);
        sb.append(", updt=").append(updt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}